<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>五彩边框</title>
</head>
<style>
    .box{
        width: 500px;
        height: 300px;
        background-position: center;
        border-left: 5px red solid;
        border-right: 5px green solid;
        border-top: 5px blue solid;
        border-bottom: 5px yellow solid;
 
 
            background-image: url(R-c.jpg);
            background-size: 100px 100px;
            background-position: center;
            background-repeat: no-repeat;
    }
</style>
<body>
    <div class="box"></div>
</body>
</html>